<template>
  <div class="info-container">
    <div class="left">
      <el-menu
        default-active="info"
        class="el-menu-demo"
        @select="selectMenu"
      >
        <el-menu-item index="info">
          <i class="el-icon-user" />
          <span>个人信息</span>
        </el-menu-item>
        <el-menu-item index="collection">
          <i class="el-icon-star-off" />
          <span>我的收藏</span>
        </el-menu-item>
        <el-menu-item index="comment">
          <i class="el-icon-chat-dot-round" />
          <span>我的评论</span>
        </el-menu-item>
      </el-menu>
    </div>
    <div class="right">
      <router-view />
    </div>
  </div>
</template>

<script>
export default {
  methods: {
    // 菜单选中触发
    selectMenu(index) {
      console.log("xxxx")
      this.$router.push(index)
    }
  }
}
</script>
<style scoped>
.info-container {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}
.left {
  width: 200px;
}

.right {
  width: 680px;
  background-color: #fff;
  padding: 30px;
}
</style>
